package com.itheima.example;

public class Example14 {
    public static void main(String[] args) {
        int[] arr = {3,5,1,2,6};
        int max=arr[0];
        for (int i = 0; i < arr.length; i++){
            if(arr[i]>max){
                max = arr[i];
            }
        }
        System.out.println("max="+max);
    }
}